{extend name="template/base" /}
{block name="content"}
<div class="page-container">
    <form class="mb-20" method="get" action="{:\\think\\Url::build($Request.action)}">
        <input type="text" class="input-text" style="width:250px" placeholder="标题" name="title" value="{$Request.param.title}" >
        <input type="text" class="input-text" style="width:250px" placeholder="跳转类型" name="jump_type" value="{$Request.param.jump_type}" >
        <input type="text" class="input-text" style="width:250px" placeholder="跳转的小程序appid" name="appid" value="{$Request.param.appid}" >
        <input type="text" class="input-text" style="width:250px" placeholder="显示状态" name="status" value="{$Request.param.status}" >
        <button type="submit" class="btn btn-success"><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
    </form>
    <div class="cl pd-5 bg-1 bk-gray">
        <span class="l">
            {tp:menu menu="add" /}
        </span>
        <span class="r pt-5 pr-5">
            共有数据 ：<strong>{$count ?? '0'}</strong> 条
        </span>
    </div>
    <table class="table table-border table-bordered table-hover table-bg mt-20">
        <thead>
        <tr class="text-c">
            <th width="25" hidden><input type="checkbox"></th>
            <th width="100">一级标题</th>
            <th width="100" height="10">二级标题</th>
            <th width="">跳转类型</th>
            <th width="">跳转的小程序appid</th>
            <th width="">跳转h5地址</th>
            <th width="">显示状态</th>
            <th width="">显示权重</th>
            <th width="70">操作</th>
        </tr>
        </thead>
        <tbody>
        {volist name="list" id="v1"}
        {if condition="($v1.pid == 0)"}
        <tr class="text-c">
            <td hidden><input type="checkbox" name="id[]" value="{$v1.id}"></td>
            <td>
                {if condition="$v1.pid==0"}
                {$v1.title}
                {/if}
            </td>
            <td>
                {if condition="$v1.pid!=0"}
                {$v1.title}
                {/if}
            </td>
            <td>
                <!--{$v1.jump_type|high_light=$Request.param.jump_type}-->
                <!--二级菜单-->
            </td>
            <td>
                {$v1.appid|high_light=$Request.param.appid}
            </td>
            <td>{$v1.url}</td>
            <td>
                {if condition="$v1.status==0" }
                显示
                {else /}
                不显示
                {/if}
            </td>
            <td>{$v1.weight}</td>
            <td class="f-14">
                {assign name="vo.id" value="$v1.id" /}
                {tp:menu menu='sedit' /}
                {tp:menu menu='sdeleteforever' /}
            </td>
        </tr>
        {volist name="list" id="v2"}
        {if condition="($v2.pid == $v1.id)"}
        <tr class="text-c">
            <td hidden><input type="checkbox" name="id[]" value="{$v2.id}"></td>
            <td>
                {if condition="$v2.pid==0"}
                {$v2.title}
                {/if}
            </td>
            <td>
                {if condition="$v2.pid!=0"}
                {$v2.title}
                {/if}
            </td>
            <td>
                {switch name="$v2.jump_type"}
                {case value="1"}跳转h5{/case}
                {case value="2"}跳转小程序{/case}
                {case value="4"}小程序内跳转{/case}
                {/switch}
            </td>
            <td>{$v2.appid|high_light=$Request.param.appid}</td>
            <td>{$v2.url}</td>
            <td>
                {if condition="$v2.status==0" }
                显示
                {else /}
                不显示
                {/if}
            </td>
            <td>{$v2.weight}</td>
            <td class="f-14">
                {assign name="vo.id" value="$v2.id" /}
                {tp:menu menu='sedit' /}
                {tp:menu menu='sdeleteforever' /}
            </td>
        </tr>
        {/if}
        {/volist}
        {/if}
        {/volist}
        </tbody>
    </table>
    <div class="page-bootstrap">{$page ?? ''}</div>
</div>
{/block}

